import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Medusas here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Medusas extends Enemigos
{
    /**
     * Act - do whatever the Medusas wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    private GreenfootImage medusas1=new GreenfootImage("medusa1.png");
    private GreenfootImage medusas2=new GreenfootImage("medusa2.png");
    
    public void act() 
    {         
       move(2);
       animacion();
       if(resistencia==2){
        getWorld().removeObject(this);
        return;
        }
    } 
    public Medusas(){
    setImage(medusas1);   
    }
    public void animacion(){
    animacion++;
    if(animacion==20){setImage(medusas2);}
     if(animacion==40){setImage(medusas1);animacion=0;}
    }
    
}
